/*
 * @Descripttion: 页面路由
 * @version: 
 * @Author: spring
 * @Date: 2022-04-16 22:36:06
 * @LastEditors: spring
 * @LastEditTime: 2022-04-17 18:11:48
 */
import { lazy } from "react";
import { Redirect } from "react-router-dom";

const routes = [
  {
    path: "/",
    exact: true,
    render: () => {
      return <Redirect to="/home"></Redirect>;
    },
  },
  {
    path: "/home",
    component: lazy(() => import("../pages/home")),
  },
  {
    path: "/text",
    component: lazy(() => import("../pages/text")),
  },
  {
    path: "/archives",
    component: lazy(() => import("../pages/archives")),
  },
  {
    path: "/messageBoard",
    component: lazy(() => import("../pages/messageBoard")),
  },
  {
    path: "/chat",
    component: lazy(() => import("../pages/chat")),
  },
  {
    path: "/chat",
    component: lazy(() => import("../pages/chat")),
  },
  {
    path: "/countPerson",
    component: lazy(() => import('../pages/UseReducer-app')),
  },
  {
    path: "/formTable",
    component: lazy(() => import('../pages/formTable')),
  }
];

export default routes;
